load("@rules_proto_grpc_python//:defs.bzl", "python_grpc_library")
load("@rules_python//python:defs.bzl", "py_binary", "py_library")

python_grpc_library(
    name = "routeguide",
    protos = ["@rules_proto_grpc_example_protos//:routeguide_proto"],
)

py_library(
    name = "resources",
    srcs = [
        "resources.py",
    ],
    deps = [
        ":routeguide",
    ],
)

py_binary(
    name = "client",
    srcs = [
        "client.py",
    ],
    data = ["@rules_proto_grpc_example_protos//:routeguide_features"],
    imports = ["."],
    python_version = "PY3",
    visibility = ["//examples/routeguide:__pkg__"],
    deps = [
        ":resources",
        ":routeguide",
    ],
)

py_binary(
    name = "server",
    srcs = [
        "server.py",
    ],
    data = ["@rules_proto_grpc_example_protos//:routeguide_features"],
    imports = ["."],
    python_version = "PY3",
    visibility = ["//examples/routeguide:__pkg__"],
    deps = [
        ":resources",
        ":routeguide",
    ],
)
